package com.qd.common.panda.domain.entity.wallet.plan;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 充值套餐
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class PlanDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "套餐编码不能为空", groups = DefaultGroup.class)
    @Size(max = 20, message = "套餐编码长度不能超过{max}位", groups = DefaultGroup.class)
    private String planCode;
    /**
     * 套餐名称
     */
    @Size(max = 100, message = "套餐名称长度不能超过{max}位", groups = DefaultGroup.class)
    private String planName;
    /**
     * 套餐说明
     */
    @Size(max = 200, message = "套餐说明长度不能超过{max}位", groups = DefaultGroup.class)
    private String plateNote;
    /**
     * 套餐封面
     */
    @Size(max = 200, message = "套餐封面长度不能超过{max}位", groups = DefaultGroup.class)
    private String plateCover;
    /**
     * 套餐封面显示
     */
    private String plateCoverDisplay;
    /**
     * 套餐金额
     */
    private Integer plateAmount;
    /**
     * 减免金额
     */
    private Integer deductionAmount;
    /**
     * 赠送比列
     */
    private Integer giftRatio;
    /**
     * 添加时间
     */
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    private LocalDateTime updateTime;
    /**
     * 优惠起始金额
     */
    private Integer startAmount;
    /**
     * 排序
     */
    private Integer idx;
    /**
     * 操作人
     */
    @Size(max = 50, message = "操作人长度不能超过{max}位", groups = DefaultGroup.class)
    private String operator;
    /**
     * 操作人显示
     */
    private String operatorDisplay;
    /**
     * 操作组织
     */
    @Size(max = 50, message = "操作组织长度不能超过{max}位", groups = DefaultGroup.class)
    private String operateOrgId;
    /**
     * 操作组织显示
     */
    private String operateOrgIdDisplay;
    /**
     * 是否启用
     */
    @Size(max = 50, message = "是否启用长度不能超过{max}位", groups = DefaultGroup.class)
    private String enable;
    /**
     * 是否启用显示
     */
    private String enableDisplay;

    @Override
    public void freeData() {
        this.planCode = null;
        this.planName = null;
        this.plateNote = null;
        this.plateCover = null;
        this.plateCoverDisplay = null;
        this.plateAmount = null;
        this.deductionAmount = null;
        this.giftRatio = null;
        this.addTime = null;
        this.updateTime = null;
        this.startAmount = null;
        this.idx = null;
        this.operator = null;
        this.operatorDisplay = null;
        this.operateOrgId = null;
        this.operateOrgIdDisplay = null;
        this.enable = null;
        this.enableDisplay = null;
        super.freeData();
    }
}
